package io.renren.modules.sys.service.impl;

import io.renren.modules.sys.dao.SysDictionariesKeyDao;
import io.renren.modules.sys.entity.SysDictionariesKeyEntity;
import io.renren.modules.sys.service.SysDictionariesKeyService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;




@Service("sysDictionariesKeyService")
public class SysDictionariesKeyServiceImpl extends ServiceImpl<SysDictionariesKeyDao, SysDictionariesKeyEntity> implements SysDictionariesKeyService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        EntityWrapper wrapper= new EntityWrapper<SysDictionariesKeyEntity>();
        wrapper.orderBy("id",false);
        Page<SysDictionariesKeyEntity> page = this.selectPage(
                new Query<SysDictionariesKeyEntity>(params).getPage(),
                wrapper
        );
        return new PageUtils(page);
    }

    /**
     * 得到所有数据
     * @return
     */
    @Override
    public List<SysDictionariesKeyEntity> getListAll() {
        return this.selectList(new EntityWrapper<>());
    }

}
